package com.aipolice.aipolice.pojo;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "face_", schema = "aipolice", catalog = "")
public class Face {
    private int id;
    private String idNum;
    private String crimeRecord;
    private String img;
    private String state;
    private Integer del;
    private Integer uid;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "id_num")
    public String getIdNum() {
        return idNum;
    }

    public void setIdNum(String idNum) {
        this.idNum = idNum;
    }

    @Basic
    @Column(name = "crime_record")
    public String getCrimeRecord() {
        return crimeRecord;
    }

    public void setCrimeRecord(String crimeRecord) {
        this.crimeRecord = crimeRecord;
    }

    @Basic
    @Column(name = "img")
    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    @Basic
    @Column(name = "state")
    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Basic
    @Column(name = "del")
    public Integer getDel() {
        return del;
    }

    public void setDel(Integer del) {
        this.del = del;
    }

    @Basic
    @Column(name = "uid")
    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Face face = (Face) o;
        return id == face.id &&
                Objects.equals(idNum, face.idNum) &&
                Objects.equals(crimeRecord, face.crimeRecord) &&
                Objects.equals(img, face.img) &&
                Objects.equals(state, face.state) &&
                Objects.equals(del, face.del) &&
                Objects.equals(uid, face.uid);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, idNum, crimeRecord, img, state, del, uid);
    }
}
